<?php

namespace App\Admin\Controllers;

use App\Admin\Repositories\Url;
use Dcat\Admin\Form;
use Dcat\Admin\Grid;
use Dcat\Admin\Show;
use Dcat\Admin\Http\Controllers\AdminController;

class UrlController extends AdminController
{
    /**
     * Make a grid builder.
     *
     * @return Grid
     */
    protected function grid():Grid
    {
        return Grid::make(new LiveBroadcastRoomController(), function (Grid $grid) {
            $grid->column('id');

            $grid->column('appName','appName');
            $grid->column('streamName','streamName');

            $grid->column('created_at');
            $grid->column('updated_at')->display(function (){

            });


            $grid->rowSelector()->titleColumn('streaming_url');
            $grid->paginate(6);
            $grid->disableActions();
            $grid->filter(function (Grid\Filter $filter){
               $filter->like('appName')->width(4);
               $filter->like('streamName')->width(4);
            });
        });
    }
}
